\subsection{Mapping code}
Mapping code can be created in various ways like mapping generators, XSLT or manual coding.
The framework used for this paper is able to handle code generation and manual coding based on Java.
Normally a class containing mapping code consists of a couple of hundred lines of mapping code, depending on the size of the message.
One typical characteristics of this code is that is contains more flow control statements than what you would encounter in regular programs, which as impact on cyclomatic complexity.
Typical examples of mapping code are shown in Listing~\ref{optionalfieldmapping} and Listing~\ref{morecomplexcode}.
\input{sections/mappingcodeexample}
Calculating cyclomatic complexity of mapping code can give a wrong indication of complexity in terms of understandability. Listing~\ref{optionalfieldmapping} is easier to understand then Listing~\ref{morecomplexcode} for a developer that works with this type of code, because they recognize the pattern in the code as an optional field mapping. The code in Listing~\ref{morecomplexcode} does a more complex mapping and is harder to understand.
Also the pattern in Listing~\ref{optionalfieldmapping} recurs more frequent in mapping code compared to the pattern in Listing~\ref{morecomplexcode}, which helps the developer in recognizing the pattern faster.
Both examples score a 4 on cyclomatic complexity. Therefore looking only at cyclomatic complexity for the code does not differentiate them regarding understandability. Regarding to for example testing they still require the same amount of test cases. From that point of view they are equally complex.
Being able to properly differentiate the code in understandability can help with getting the right input for questions like estimating time needed for changes or giving a focus area for refactoring. 
\\\\
Problem Statement: Cyclomatic complexity does not give the right indication for understandability of code in the case of mapping code within the context of ESB programs
\\\\
We assuming the developer has experience with mapping code and is able to recognize patterns like  Listing~\ref{optionalfieldmapping}.
If the developer is not able to do that, the adaption is not useful as it still gives a wrong indication of complexity.